package com.luyuan.service;

/**
 * @author: lailuyuan
 * @date: 2025-01-22 10:12
 * @desc:
 */
import com.luyuan.dao.dto.User;
import com.luyuan.repository.UserRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserService {

    @Autowired
    private UserRepository userRepository;

    public List<User> getAllUsers() {
        return userRepository.findAll();
    }

    public void saveUser(User user) {
        userRepository.save(user);
    }

}

